﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZF.BLL;
using GCELibrary.Current;
namespace ZF.WS.UserControls.Index
{
    public partial class Bottom : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            using (var dc = SiteInfo.CreateDBDataContext())
            {
                var cacheKey="Bottom_FLink";

                List<Model.Sys_FLink> list = null;
                var obj = HttpCache.GetCache(cacheKey);
                if (obj != null && obj is List<Model.Sys_FLink>)
                {
                    list = obj as List<Model.Sys_FLink>;
                }
                else
                {
                    list = dc.Sys_FLink.ToList();
                    SiteInfo.Instance.SetPageCache(cacheKey,list);
                }
                //list.AddRange(list);
                //list.AddRange(list);
                //list.AddRange(list);
                this.lvIcon.DataSource = list.ToList();
                this.lvIcon.DataBind();
                //this.lvText.DataSource = list.Where(p => !p.IsImage).ToList();
                //this.lvText.DataBind();
            }
        }
    }
}